home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 11 / PC World Interactive 11.iso / share / multimed / MAINACT / DATA1.CAB / Script_Files / framinfo.rex < prev    next >
OS/2 REXX Batch file  |  1998-05-04  |  2KB  |  50 lines

  1. /**************************************************************
  2.  *                                                            *
  3.  *                   MainActor Rexx Script                    *
  4.  *                                                            *
  5.  *  Writes all available information for the frames of the    *
  6.  *  current project to a file                                 *
  7.  *                                                            *
  8.  *                                                            *
  9.  *  Last modified: 09/06/97, Written by: Markus Moenig        *
  10.  *                                                            *
  11.  **************************************************************/
  12.  
  13.   filename="c:\frames.txt"                            /* Set output filename */
  14.  
  15.   IF GetGlobalInfo("LOADEDPROJECTS")= "0" THEN DO     /* Check if there are */
  16.    BEGIN                                              /* any projects loaded */
  17.     say "No project loaded! Trying to load project..."/* No: try to load one */
  18.     rc=LoadProject("")                                /* If succeeded, rc = 0 */
  19.     IF rc <> "0" THEN DO
  20.       say "No project loaded! Exiting ..."            /* Failed, exiting ... */
  21.       exit
  22.     END 
  23.    END
  24.  
  25.   SetInfoText("Writing frame information ...")     /* Set descriptive info text */
  26.   say "Writing frame information to" filename "..."
  27.  
  28.   hasAudio="0"
  29.   IF GetProjectInfo("AUDIOMODE") <> NULL THEN hasAudio="1"  /* Check for audio */
  30.  
  31.   isPictureList="0"                  /* Check if project is picture list */
  32.   IF GetProjectInfo("TYPE") ="Picture List" THEN isPictureList="1"
  33.  
  34.   frames=GetProjectInfo("FRAMES")
  35.   i=1;
  36.   DO WHILE i <= frames                            /* Iterate through all frames */
  37.    CALL LineOut filename, "Info for frame" i ":"
  38.    CALL LineOut filename, "  Image Data Size:" GetFrameInfo(i, "SIZE")
  39.    CALL LineOut filename, "  Image Data Offset:" GetFrameInfo(i, "OFFSET")
  40.    CALL LineOut filename, "  Timecode:" GetFrameInfo(i, "TIMECODE") "ms"
  41.    CALL LineOut filename, "  Compression:" GetFrameInfo(i, "COMPRESSION")
  42.    CALL LineOut filename, "  Keyframe:" GetFrameInfo(i, "KEYFRAME")
  43.    IF hasAudio <> "0" THEN CALL LineOut filename, "  Audio Size:" GetFrameInfo(i, "AUDIOSIZE")
  44.    IF isPictureList ="1" THEN CALL LineOut filename, "  Picture Name:" GetFrameInfo(i, "PICTURENAME")
  45.    i=i+1
  46.   END
  47.  
  48.   CALL LineOut filename                 /* Close stream */
  49.  
  50.   say "Ready."